<template>
  <view class="template-shop tn-safe-area-inset-bottom">
    <!-- 顶部自定义导航 -->
    <tn-nav-bar fixed alpha customBack>
      <view slot="back" class='tn-custom-nav-bar__back'
        @click="goBack">
        <text class='icon tn-icon-left'></text>
      </view>
      <view slot="right" class='tn-custom-nav-bar__right'>
        <text class='icon xicon-share'></text>
      </view>
    </tn-nav-bar>
    <scroll-view scroll-y="true"
      :scroll-anchoring="true" 
      scroll-with-animation
      class="classics-scroll" 
      @scrolltolower="getList()"
    >
      <!-- 店铺 start-->
      <view class="shop-wrap">
        <view class="shop-function"
        :style="{
          'background-image': `url(${itemData.albums && itemData.albums[0].url})`
        }">
          <view class="shop-func-mask"
          :style="{
            paddingTop: vuex_custom_bar_height + 'px'
          }"
          >
            <view
              class="shop-tags-marqueen dinner-tags"
            >
              <view 
              :style="{
                animationDuration: Math.max(labels.length * 2, 10) + 's'
              }"
              class="shop-tags-cont">
                <view
                 v-if="labels"
                 v-for="(label, index) in labels"
                 class="dinner-tag"
                 :class="[`dinner-tag-${index%4}`]"
                >
                  <view class="dinner-label-name">
                    <view
                     class="dinner-label-tag"
                     >
                       {{label.label}}
                    </view>
                    <view class="diner-label-amount">
                      <text class="tn-icon tn-icon-close"></text>
                      {{label.amount}}
                    </view> 
                  </view>
                  <view @click="postLabel(label.label)"
                   class="dinner-tags-praise">
                   <text>+1</text>
                  </view>
                </view>
              </view>
            </view>
            <view class="shop-area tn-flex tn-flex-row-between
             tn-flex-col-center tn-margin">
              <view class="tn-flex tn-flex-direction-column">
                <view class="shop-area-name">
                  {{itemData.name}}
                </view>
                <view class="tn-flex tn-flex-col-center">
                  <text class="shop-area-address">{{itemData.address}}</text>
                </view>
                <view class="shop-content-fames">
                  <view class="shop-content-fame">
                    双流区美食人气榜第2名
                  </view>
                  <view class="shop-content-location">
                    <text class="xicon-location location-icon"></text>
                    <text class="location-title">{{ formatDistance(itemData.distance) }}</text>
                  </view>
                </view>
              </view>
            </view>
          </view>
        </view>
      </view>
      <tn-tabs 
        :list="tabsList" 
        :isScroll="false" 
        :current="currentTab" 
        name="tab-name" 
        :showBar="false"
        @change="changeTab"></tn-tabs>
      <view class="dish-title-wrap">
        <view class="nav_title--wrap">
          <view class="nav_title tn-bg-black">
            <!-- <text class="tn-icon-relation tn-padding-right-sm tn-text-xxl"></text> -->
            <text class="tn-text-xl">招牌菜 · 必点菜</text>
            <!-- <text class="tn-icon-relation tn-padding-left-sm tn-text-xxl"></text> -->
          </view>
        </view>
      </view> 
      
      <!-- 商家商品 start-->
      <view class="tn-flex tn-flex-wrap 
      tn-margin-left-sm tn-margin-bottom-sm 
      tn-margin-right-sm tn-margin-top-xs">
        <block v-for="(item, index) in itemData.restaurantsMenuDish" :key="index">
          <view class="" style="width: 50%;">
            <view class="tn-blogger-content__wrap">
              <view class="image-picbook" 
              :style="'background-image:url(' + getImage(item.albums) + ')'">
                <view class="image-book">
                </view>
              </view> 
              
              <view class="tn-blogger-content__label tn-text-justify tn-padding-sm">
                <text class="tn-blogger-content__label__desc">{{ item.restaurantsMenuName }}</text>  
                <view class="">
                  <text class="tn-blogger-content__count-icon">￥</text> 
                  <text class="tn-blogger-content__count-icon-text">{{ item.price }}</text>
                </view>
              </view>
            </view>
          </view>
        </block>
      </view>
      <!-- 商品 end-->
      
      <view v-if="list.length" class="">
        <view class="nav_title--wrap">
          <view class="nav_title tn-bg-black">
            <!-- <text class="tn-icon-relation tn-padding-right-sm tn-text-xxl"></text> -->
            <text class="tn-text-xl">打卡 · 攻略</text>
            <!-- <text class="tn-icon-relation tn-padding-left-sm tn-text-xxl"></text> -->
          </view>
        </view>
      </view> 
    
      <view class="tn-flex tn-flex-direction-column 
      tn-margin-top-sm tn-margin-bottom">
        <!-- 图文信息 -->
        <block v-for="(item,index) in list">
          <view class="blogger__item" :key="index">
            <view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
              <view class="justify__author__info" @click="tn('/circlePages/blogger_other')">
                <view class="tn-flex tn-flex-row-center">
                  <view class="tn-flex tn-flex-row-center tn-flex-col-center">
                    <view class="">
                      <tn-avatar
                        class=""
                        shape="circle"
                        :src="item.avatar || 'https://fastcdn.hidino.com/hiotk/user.png'"
                        size="lg">
                      </tn-avatar>
                    </view>
                    <view class="tn-padding-right tn-text-ellipsis">
                      <view class="tn-padding-right 
                      blogger__nickname
                      tn-padding-left-sm tn-text-bold tn-text-lg">
                        {{ item.nickname ? item.nickname : '匿名' }}
                        
                      </view>
                      <view class="tn-padding-right blogger__time tn-padding-left-sm 
                      tn-padding-top-xs">
                        {{ parseDate(item.createDate) }}
                      </view>
                    </view>
                  </view>
                </view>
              </view>
              <view class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
                <!-- 为什么不放关注按钮，因为快餐文化的世界，关注按钮放在外面没必要 -->
                <text class="tn-icon-more-vertical blogger__more tn-text-bold tn-text-xxl"></text>
              </view>
            </view>
           
            <view class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left" @click="gotToDetails(item.id)">
              <view v-for="(label_item,label_index) in item.labels" 
              :key="label_index" class="blogger__desc__label
               tn-float-left tn-margin-right 
               tn-round tn-text-sm tn-text-bold">
                <text class="blogger__desc__label--prefix">#</text> 
                <text class="tn-text-df blogger__desc__label_text">{{ label_item }}</text>
              </view>
              <!-- 不用限制长度了，因为发布的时候限制长度了-->
              <text v-if="!item.labels || item.labels.length < 4" class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.record }}</text>  
            </view>
            
            <block v-if="item.albums">
              <view v-if="[1,2,4].indexOf(item.albums.length) != -1" class="tn-padding-top-xs" @click="gotToDetails(item.id)">
                <image v-for="(image_item,image_index) in item.albums" :key="image_index" 
                  class="blogger__main-image"
                  :class="{
                    'blogger__main-image--1 tn-margin-bottom-sm': item.albums.length === 1,
                    'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.albums.length === 2 || item.albums.length === 4
                  }"
                  :src="image_item"
                  mode="aspectFill"
                ></image>
              </view>
              <view v-else class="tn-padding-top-xs" @click="gotToDetails(item.id)">
                <tn-grid  hoverClass="none" :col="3">
                  <block v-for="(image_item,image_index) in item.albums" :key="image_index">
                    <tn-grid-item style="width: 30%;margin: 10rpx;">
                      <image
                        class="blogger__main-image blogger__main-image--3"
                        :src="image_item"
                        mode="aspectFill"
                      ></image>
                    </tn-grid-item>
                  </block>
                </tn-grid>
              </view>
            </block>
           
            <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
              <view class="justify-content-item blogger__count__area tn-text-center">
                <view class="">
                  <text class="blogger__count-icon xicon-bearfoot"></text> 
                  <text class="tn-padding-right">{{ item.cmtNum }}</text>
                  <text class="blogger__count-icon tn-icon-comment"></text>
                  <text class="tn-padding-right">{{ item.cmtNum }}</text>
                  <text class="blogger__count-icon tn-icon-like"></text>
                  <text class="">{{ item.likeNum }}</text>
                </view>
              </view>
              <!-- <view class="justify-content-item tn-flex tn-flex-col-center">
                <view style="margin-right: 10rpx;margin-left: 20rpx;">
                  <tn-avatar-group :lists="item.cmtAvatar || []" size="sm"></tn-avatar-group>
                </view>
                <text class="tn-color-gray">{{ item.cmtNum }}人</text>
              </view> -->
            </view>
          </view>
          
          <!-- 边距间隔 -->
          <view class="tn-strip-bottom" v-if="index != list.length - 1"></view>
        </block>
        
        <!-- 边距间隔 -->
        <view class="tn-strip-bottom"></view>
            
      </view>
    </scroll-view>

    <!-- 底部tabbar start-->
    <view class="tabbar footerfixed dd-glass" style="border-radius: 100rpx;">
      <view class="action" @click="callPhoneNumber" :data-number="itemData.phone">
        <view class="bar-icon">
          <view class="xicon-phone">
          </view>
          <!-- <image class="" src='https://tnuiimage.tnkjapp.com/tabbar/k2.png'></image> -->
        </view>
        <view class="tn-color-gray">电话</view>
      </view>
      <view class="action" @click="goToPin">
        <view class="bar-icon">
          <image src="https://fastcdn.hidino.com/dinner/camera-icon.png" />
          <!-- <image class="" src='https://tnuiimage.tnkjapp.com/tabbar/i2.png'></image> -->
        </view>
        <view class="tn-color-gray">打卡</view>
      </view>
      <view class="action" @click="openLocation">
        <view class="bar-icon">
          <view class="xicon-map">
          </view>
          <!-- <image class="" src='https://tnuiimage.tnkjapp.com/tabbar/d2.png'></image> -->
        </view>
        <view class="tn-color-gray">导航</view>
      </view>
    </view>
    <view class='tn-tabbar-height'></view>
  </view>
</template>

<script>
  import { getRestaurantInfo,
   getRestaurantLabels,
   postRestaurantLabel,
  getRestaurantRecords } from '@/libs/js/home.js';
  import { commentTags } from '@/libs/constant.js'
  import { date } from '@/libs/js/utils.js';
  import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
  export default {
    name: 'TemplateShop',
    mixins: [template_page_mixin],
    data(){
      return {
        cardCur: 0,
        id: 0,
        listQuery: {
          id: 0
        },
        labels: [],
        commentTags: commentTags,
        labelsMap: {},
        itemData: {},
        cardCur2: 0,
        tabsList: [
          {
            name: '招牌菜'
          },
          {
            name: '打卡攻略'
          }
        ],
        currentTab: 0,
        recordQuery: {
          restaurantsId: 0,
          lat: '',
          lng: '',
          limit: 20,
          page: 1
        },
        list: [],
        records: [],
        show1: false,
        show2: false,
        posting: false,
        loading: false,
        loaded: false,
      }
    },
    onLoad(options) {
      console.log(options)
      const id = options.id || 0;
      if(id){
        this.listQuery.id = id;
        this.recordQuery.restaurantsId = id;
        this.getInfo(id);
        this.getLabels(id);
      }
    },
    methods: {
      // 更新轮播容器信息
      formatDistance(distance){
        if(distance> 1000){
          return (distance / 1000).toFixed(1) + 'km'
        }else{
          return Math.floor(distance) + 'm'; 
        }
      },
      changeTab(index) {
        
      },
      getInfo(id){
        const that = this;
        uni.getLocation({
        	type: 'gcj02',
          timeout: 1,
        	success: function(res) {
        		that.listQuery.lng = res.longitude;
        		that.listQuery.lat = res.latitude;
            that.recordQuery.lng = res.longitude;
            that.recordQuery.lat = res.latitude;
        		that.getRes();
            that.getList();
        	},
        	fail: function() {
            console.log('faile')
        		that.getRes();
            that.getList();
        	}
        })
      },
      getList() {
        if(this.loading || this.loaded){
          return;
        }
        this.loading = true;
        getRestaurantRecords(this.recordQuery).then(res => {
          if (res.code === 0 && res.data && res.data.list && res.data.list.length) {
          	const t = res.data.list.map(r => {
          		return {
                ...r,
          			title: r.record,
          			address: r.addresses,
          			albums: r.albums && r.albums.match(/http/gi) ? r.albums.split(',') : '',
          			labels: r.restaurantsLabels ? JSON.parse(r.restaurantsLabels) : [],
          		}
          	})
            if(this.recordQuery.page == 1){
              this.list = t;
            }else{
              this.list = this.list.concat(t);
            }
          
            if(t.length < this.recordQuery.limit){
              this.loaded = true;
            }
            console.log(this.list);
          }else{
            this.loaded = true;
          }
          this.recordQuery.page++;
          this.loading = false;
        });
      },
      parseDate(d) {
        return date('Y年m月d日H时i分s秒', d)
      },
      postLabel(label){
        this.posting = true;
        setTimeout(() => {
          this.posting = false;
        }, 400)
        postRestaurantLabel({
          label: label,
          restaurantsId: this.itemData.id
        }).then((res) => {
          if(res.code === 0){
            this.$store.commit('pushTags', label);
            this.getLabels(this.itemData.id);
            this.showCom = false;
            this.showModel = false;
          }else{
            this.$t.message.toast(res.msg);
          }
        })
      },
      formatDistance(distance){
        if(distance> 10000){
          return Math.round(distance / 1000) + 'km'
        }else{
          return distance + 'm'; 
        }
      },
      getRes() {
        getRestaurantInfo(this.listQuery).then(res => {
          if(res.code === 0){
            this.itemData = res.data;
            this.itemData.albums = JSON.parse(res.data.albums);
            console.log(this.itemData)
          }
        })
      },
      getImage(albums){
        try{
          const alb = JSON.parse(albums)
          if(alb.length){
            return alb[0].url + '?x-oss-process=image/resize,m_fixed,h_170,w_100'
          }
        }catch(e){
          
        }
      },
      getLabels(id){
        getRestaurantLabels({
          restaurantsId: id
        }).then(res => {
          if(res.code === 0){
            this.labels = res.data;
          }
          this.showCom = false;
          this.showModel = false;
        })
      },
      // cardSwiper
      cardSwiper(e) {
        this.cardCur = e.detail.current
      },
      // cardSwiper
      cardSwiper2(e) {
        this.cardCur2 = e.detail.current
      },
      // 跳转
      tn(e) {
        uni.navigateTo({
          url: e,
        });
      },
      openLocation() {
        uni.openLocation({
          longitude: +this.itemData.lng,
          latitude: +this.itemData.lat,
          name: this.itemData.name,
          address: this.itemData.address
        })
      },
      //拨打固定电话
      callPhoneNumber() {
        uni.makePhoneCall({
          phoneNumber: this.itemData.phone,
        });
      },
      goToPin() {
        uni.navigateTo({
          url: '/circlePages/edit?id=' + this.listQuery.id
        })
      },
      
      // 预览作者图片
      previewQRCodeImage() {
        wx.previewImage({
          urls: ['https://tnuiimage.tnkjapp.com/advertise/qrcode.jpg']
        })
      },
      
      // 弹出模态框1
      showModal(event) {
        this.openModal()
      },
      // 打开模态框
      openModal() {
        this.show1 = true
      },
      
      // 弹出压屏窗
      showLandscape() {
        this.openLandscape()
      },
      // 打开压屏窗
      openLandscape() {
        this.show2 = true
      },
      // 关闭压屏窗
      closeLandscape() {
        this.show2 = false
      }
    }
  }
</script>

<style lang="scss" scoped>
  .template-shop{
  }
  .shop-tags-marqueen{
    width: 100%;
    overflow: hidden;
    .shop-tags-cont{
      display: flex;
      flex-direction: row;
      align-items: center;
      flex: 1;
      flex-wrap: nowrap;
      padding-left: 100%;
      animation: tn-notice-loop-animation 10s linear infinite both;
    }
  }
  @keyframes tn-notice-loop-animation {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-100%);
    }
  }
  .tn-tabbar-height {
  	min-height: 120rpx;
  	height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  }
  /* 胶囊*/
  .tn-custom-nav-bar__back {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-sizing: border-box;
    color: #FFFFFF;
    padding-left: 30rpx;
    .icon {
      display: block;
      flex: 1;
      color: #fff;
      font-size: 48rpx;
      margin: auto;
      text-align: center;
    }
  }
  .tn-custom-nav-bar__right {
    width: 100%;
    height: 100%;
    padding-right: 30rpx;
    position: relative;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-sizing: border-box;
    color: #FFFFFF;
    .icon {
      display: block;
      flex: 1;
      color: #fff;
      font-size: 48rpx;
      margin: auto;
      text-align: center;
    }
  }
  
  /* 轮播视觉差 start */
  .card-swiper {
    height: 250rpx !important;
  }
    
  .card-swiper swiper-item {
    width: 750rpx !important;
    left: 0rpx;
    box-sizing: border-box;
    // padding: 0rpx 30rpx 90rpx 30rpx;
    overflow: initial;
  }
    
  .card-swiper swiper-item .swiper-item {
    width: 100%;
    display: block;
    height: 100%;
    transform: scale(1);
    transition: all 0.2s ease-in 0s;
    overflow: hidden;
  }
    
  .card-swiper swiper-item.cur .swiper-item {
    transform: none;
    transition: all 0.2s ease-in 0s;
  }
  
  .image-banner{
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .image-banner image{
    width: 100%;
    height: 100%;
  }
  
  /* 轮播指示点 start*/
  .indication{
    z-index: 9999;
    width: 100%;
    height: 36rpx;
    position: absolute;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
    // opacity: 0;
  }
  
  .spot{
    background-color: #FFFFFF;
    opacity: 0.6;
    width: 10rpx;
    height: 10rpx;
    border-radius: 20rpx;
    top: -60rpx;
    margin: 0 8rpx !important;
    position: relative;
  }
  
  .spot.active{
    opacity: 1;
    width: 30rpx;
    background-color: #FFFFFF;
  }
  
  /* 顶部店铺 */
  .shop-function {
    position: relative;
    z-index: 1;
    height: 400rpx;
    margin-bottom: 90rpx;
    background-size: cover;
    background-position: top center;
    .shop-func-mask{
      background-color: rgba(0, 0, 0, 0.3);
      height: 100%;
    }
    .shop-area{
      background: #FFFFFF;
      box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.1);
      border-radius: 20rpx;
      opacity: 1;
      margin: 32rpx;
      padding: 32rpx;
      .shop-area-name{
        line-height: 22px;
        font-size: 16px;
        font-family: PingFang SC, PingFang SC;
        font-weight: 500;
        color: #262626;
        margin-bottom: 5px;
      }
      .shop-area-address{
        line-height: 17px;
        font-size: 12px;
        font-family: PingFang SC, PingFang SC;
        font-weight: 400;
        color: #999999;
      }
      .shop-content-fames{
        display: flex;
        flex-direction: row;
        align-items: center;
        white-space: nowrap;
        justify-content: flex-start;
        margin-top: 8rpx;
        .shop-content-fame{
          line-height: 28rpx;
          font-size: 20rpx;
          font-family: PingFang SC, PingFang SC;
          font-weight: 400;
          color: #FF8800;
          padding: 4rpx 16rpx;
          background-color: rgba(254, 226, 186, 1);
          border-radius: 4rpx;
        }
        .shop-content-location{
          margin-top: 5px;
          .location-icon{
            font-size: 16rpx;
            margin: 0 8rpx 0 32rpx;
            color: #999999;
          }
          .location-title{
            font-size: 24rpx;
            font-family: PingFang SC, PingFang SC;
            font-weight: 500;
            color: #999999;
          }
        }
      }
    }
  }
  
  /* 阴影 start*/
  .shop-shadow {
    border-radius: 15rpx;
    box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  }
  
  /* 头像 start */
  .logo-image {
    width: 110rpx;
    height: 110rpx;
    position: relative;
  }
  
  .logo-pic {
    background-size: cover;
    background-repeat: no-repeat;
    // background-attachment:fixed;
    background-position: top;
    box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
    border-radius: 10rpx;
    overflow: hidden;
    // background-color: #FFFFFF;
  }
  
  
  /* 资质轮播*/
  /* .tnphone-black-min 细边框*/
  .tnphone-black-min {width: 380rpx; height: 760rpx; border-radius: 40rpx; background: #C6D1D8; padding: 7rpx; display: table; color: #333;
  	box-sizing: border-box; box-shadow: 0rpx 0rpx 0rpx 5rpx rgba(80,80,80,.8) inset; margin: 70rpx auto; cursor: default; position: relative}
  .tnphone-black-min .skin {width: 100%; height: 100%; border-radius: 40rpx; background: #222; padding: 10rpx; box-shadow: 0rpx 0rpx 0rpx 7rpx rgba(68,68,68,.3)}
  .tnphone-black-min .screen {width: 100%; height: 100%; border-radius: 30rpx; background: #fff; position: relative; overflow: hidden}
  .tnphone-black-min .head {width: 100%; height: 90rpx; text-align: center; position: absolute; padding: 45rpx 15rpx 10rpx 15rpx;}
  .tnphone-black-min .peak {left: 22%;width: 56%; height: 27rpx; margin: -2rpx auto 0rpx; border-radius: 0 0 20rpx 20rpx; background: #222; position: absolute}
  .tnphone-black-min .sound {width: 48rpx; height: 6rpx; border-radius: 15rpx; background: #555; position: absolute; left: 50%; top: 50%; margin-left: -24rpx; margin-top: -10rpx;
  	box-shadow: 0rpx 4rpx 4rpx 0rpx #444 inset}
  .tnphone-black-min .lens {width: 6rpx; height: 6rpx; border-radius: 50%; background: #2c5487; position: absolute; left: 50%; top: 50%; margin-left: 34rpx; margin-top: -10rpx}
  .tnphone-black-min .talk {width: 50%; height: 6rpx; border-radius: 15rpx; background: rgba(0,0,0,.3); position: absolute; bottom: 8rpx; left: 50%; margin-left: -25%}
  .tnphone-black-min .area-l,.tnphone-black-min .area-r {width: 70rpx; height: 16rpx; position: absolute; top: 6rpx}
  .tnphone-black-min .area-l {left: 0; text-align: center; font-size: 12rpx; line-height: 22rpx; text-indent: 10rpx; font-weight: 600; padding-left: 20rpx;}
  .tnphone-black-min .area-r {right: 0; text-align: center; font-size: 12rpx; line-height: 22rpx; text-indent: 10rpx; font-weight: 600; padding-right: 20rpx;}
  .tnphone-black-min .fa-feed {float: left; font-size: 12rpx!important; transform:rotate(-45deg); margin-top: 4rpx; margin-right: 8rpx}
  .tnphone-black-min .fa-battery-full {float: left; font-size: 12rpx!important; margin-top: 6rpx}
  .tnphone-black-min .fa-chevron-left {float: left; margin-top: 4rpx}
  .tnphone-black-min .fa-cog {float: right; margin-top: 4rpx}
  .tnphone-black-min .btn01 {width: 3rpx; height: 28rpx; border-radius: 3rpx 0 0 3rpx; background: #222; position: absolute; top: 105rpx; left: -3rpx}
  .tnphone-black-min .btn02 {width: 3rpx; height: 54rpx; border-radius: 3rpx 0 0 3rpx; background: #222; position: absolute; top: 160rpx; left: -3rpx}
  .tnphone-black-min .btn03 {width: 3rpx; height: 54rpx; border-radius: 3rpx 0 0 3rpx; background: #222; position: absolute; top: 230rpx; left: -3rpx}
  .tnphone-black-min .btn04 {width: 3rpx; height: 86rpx; border-radius: 0 3rpx 3rpx 0; background: #222; position: absolute; top: 180rpx; right: -3rpx}
   
  /* 轮播样机样式 start*/
  .card-swiper2 {
    height: 70vh !important;
    width: 100vw !important;
    padding-top: 4vh;
  }
  
  .classics-scroll{
    height: 100vh;
    box-sizing: border-box;
  }
  
  .card-swiper2 swiper-item {
    width: 380rpx !important;
    left: -155rpx;
    box-sizing: border-box;
    padding: 0rpx 0rpx 90rpx 0rpx;
    overflow: initial;
  }
  
  .card-swiper2 swiper-item .swiper-item {
    display: block;
    transform: scale(0.7);
    transition: all 0.2s ease-in 0s;
    overflow: hidden;
  }
  
  .card-swiper2 swiper-item.cur .swiper-item {
    transform: none;
    transition: all 0.2s ease-in 0s;
  }
  
  
  .image-banner2{
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .image-banner2 image{
    width: 100%;
    height: 730rpx;
    // border: 1rpx solid red;
  }
  
  /* 轮播指示点 start*/
  .indication2{
    margin-top: 50vh;
    z-index: 9999;
    width: 100%;
    height: 36rpx;
    position: absolute;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
  }
  
  .spot2{
    background-color: #FFFFFF;
    opacity: 0.6;
    width: 10rpx;
    height: 10rpx;
    border-radius: 20rpx;
    top: 0rpx;
    margin: 0 8rpx !important;
    position: relative;
  }
  
  .spot2.active{
    opacity: 1;
    width: 30rpx;
    background-color: #FFFFFF;
  }
  .dinner-tags{
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    .dinner-tag{
      border-radius: 4px;
      flex-shrink: 0;
    }
    .dinner-tag + .dinner-tag{
      margin-left: 16rpx;
    }
  }
  /* 商家商品 start*/
  .tn-blogger-content {
    &__wrap {
      box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.1);
      border-radius: 20rpx;
      margin: 15rpx;
    }
    
    &__info {
      &__btn {
        margin-right: -12rpx;
        opacity: 0.5;
      }
    }
    
    &__label {
      display: flex;
      flex-direction: row;
      align-items: flex-end;
      justify-content: space-between;
      &__item {
        line-height: 45rpx;
        padding: 0 10rpx;
        margin: 5rpx 18rpx 0 0;
        
        &--prefix {
          color: #E83A30;
          padding-right: 10rpx;
        }
      }
      
      &__desc {
        line-height: 35rpx;
        font-size: 14px;
        font-family: PingFang SC, PingFang SC;
        font-weight: 500;
        color: #262626;
      }
    }
    
    &__main-image {
      border-radius: 16rpx 16rpx 0 0;
      
      &--1 {
        max-width: 690rpx;
        min-width: 690rpx;
        max-height: 400rpx;
        min-height: 400rpx;
      }
      
      &--2 {
        max-width: 260rpx;
        max-height: 260rpx;
      }
      
      &--3 {
        height: 212rpx;
        width: 100%;
      }
    }
    
    &__count-icon {
      font-size: 24rpx;
      padding-right: 5rpx;
      font-size: 10px;
      font-family: PingFang SC, PingFang SC;
      font-weight: 400;
      color: #EC5446;
    }
    &__count-icon-text{
      font-size: 16px;
      font-family: PingFang SC, PingFang SC;
      font-weight: 400;
      color: #EC5446;
    }
  }
  
  .image-book{
    padding: 100rpx 0rpx;
    font-size: 16rpx;
    font-weight: 300;
    position: relative;
  }
  .image-picbook{
    background-size: cover;
    background-repeat:no-repeat;
    // background-attachment:fixed;
    background-position: center;
    border-radius: 15rpx 15rpx 0 0;
  }
  
  /* 商家商品 end*/
  
  
  /* 文章内容 start*/
  .tn-blogger-content2 {
    &__wrap {
      padding: 30rpx;
    }
    
    &__info {
      &__btn {
        margin-right: -12rpx;
        opacity: 0.5;
      }
    }
    
    &__label {
      &__item {
        line-height: 45rpx;
        padding: 0 20rpx;
        margin: 5rpx 18rpx 0 0;
        
        &--prefix {
          color: #00FFC8;
          padding-right: 10rpx;
        }
      }
      
      &__desc {
        line-height: 55rpx;
      }
    }
    
    &__main-image {
      box-shadow: 0rpx 5rpx 40rpx 0rpx rgba(43, 158, 246, 0.2);
      border-radius: 16rpx;
      
      &--1 {
        max-width: 690rpx;
        min-width: 690rpx;
        max-height: 400rpx;
        min-height: 400rpx;
      }
      
      &--2 {
        max-width: 260rpx;
        max-height: 260rpx;
      }
      
      &--3 {
        height: 212rpx;
        width: 100%;
      }
    }
    
    &__count-icon {
      font-size: 40rpx;
      padding-right: 5rpx;
    }
  }
  
  .image-design{
    padding: 180rpx 0rpx;
    font-size: 40rpx;
    font-weight: 300;
    position: relative;
  }
  .image-pic{
    background-size: cover;
    background-repeat:no-repeat;
    // background-attachment:fixed;
    background-position:top;
    border-radius: 10rpx;
  }
  /* 文章内容 end*/
  
  
  /* 资讯主图 start*/
  .image-article {
    border-radius: 8rpx;
    border: 1rpx solid #F8F7F8;
    width: 200rpx;
    height: 200rpx;
    position: relative;
  }
  
  .image-pic {
    background-size: cover;
    background-repeat: no-repeat;
    // background-attachment:fixed;
    background-position: top;
    border-radius: 10rpx;
  }
  
  .article-shadow {
    border-radius: 15rpx;
    box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  }
  
  /* 文字截取*/
  .clamp-text-1 {
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
  .clamp-text-2 {
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
  
  /* 标签内容 start*/
  .tn-tag-content {
    &__item {
      display: inline-block;
      line-height: 35rpx;
      padding: 7rpx 25rpx 5rpx 25rpx;
  
      &--prefix {
        padding-right: 10rpx;
      }
    }
  }
  
  /* 图标容器9 start */
  .icon9 {
    &__item {
      width: 30%;
      background-color: #FFFFFF;
      border-radius: 10rpx;
      transform: scale(1);
      transition: transform 0.3s linear;
      transform-origin: center center;
      
      &--icon {
        width: 80rpx;
        height: 80rpx;
        font-size: 50rpx;
        border-radius: 50%;
        margin-bottom: 18rpx;
        position: relative;
        z-index: 1;
        
        &::after {
          content: " ";
          position: absolute;
          z-index: -1;
          width: 100%;
          height: 100%;
          left: 0;
          bottom: 0;
          border-radius: inherit;
          opacity: 1;
          transform: scale(1, 1);
          background-size: 100% 100%;
          background-image: url(https://tnuiimage.tnkjapp.com/cool_bg_image/icon_bg6.png);
        }
      }
    }
  }
    
  .dish-title-wrap{
  
  }
  /* 标题 start */
  .nav_title {
    -webkit-background-clip: text;
    color: transparent;
    line-height: 22px;
    font-size: 16px;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    color: #262626;
    &--wrap {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 0 32rpx;
      font-weight: 400;
      background-size: cover;
    }
  }
  /* 标题 end */  
  
  /* 信息展示 start */
  .tn-info {
    &__item {
      width: 48%;
      margin: 15rpx 0rpx;
      padding: 28rpx;
      border-radius: 15rpx;
      position: relative;
      z-index: 1;
    }
  }
  /* 信息展示 end */
  
  /* 图标容器5 start */
    .icon5 {
      &__item {
        // width: 30%;
        background-color: #FFFFFF;
        border-radius: 10rpx;
        padding: 0rpx;
        margin: 0rpx;
        transform: scale(1);
        transition: transform 0.3s linear;
        transform-origin: center center;
        
        &--icon {
          width: 80rpx;
          height: 80rpx;
          border-radius: 50%;
          position: relative;
          z-index: 1;
        }
      }
    }
  

  /* 底部tabbar start*/
  .footerfixed{
   position: fixed;
   // margin: 20rpx;
   margin: 40rpx 30rpx;
   width: 690rpx;
   bottom: calc(env(safe-area-inset-bottom) / 2);
   z-index: 999;
   background-color: rgba(255,255,255,0.5);
   box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
  }
  
  .tabbar {
    display: flex;
    align-items: center;
    min-height: 110rpx;
    justify-content: space-between;
  	padding: 0;
  	height: calc(110rpx + env(safe-area-inset-bottom) / 2);
  	// padding-bottom: calc(env(safe-area-inset-bottom) / 2);
  }
  
  .tabbar .action {
  	position: relative;
  	flex: 1;
  	text-align: center;
  	padding: 0;
  	display: block;
  	height: auto;
  	line-height: 1;
  	margin: 0;
    font-size: 12px;
    font-family: PingFang SC, PingFang SC;
    font-weight: 500;
    color: #666666;
  	overflow: initial;
  }
  
  .tabbar .action .bar-icon {
  	width: 100rpx;
  	position: relative;
  	display: block;
  	height: auto;
  	margin: 0 auto 10rpx;
  	text-align: center;
    color: #666666;
  	font-size: 42rpx;
  }
  
  .tabbar .action .bar-icon image {
  	width: 50rpx;
  	height: 50rpx;
  	display: inline-block;
  }
  
  /* 毛玻璃*/
  .dd-glass {
     width: 690rpx;
     backdrop-filter: blur(20rpx);
    -webkit-backdrop-filter: blur(20rpx);
  }
    
</style>
